﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.ComponentModel;

namespace CoreGallery.Addins.Contracts
{
    public interface IPhoto : INotifyPropertyChanged 
    {
        Guid UniqueId  { get; }

        IList<CoreGallery.Addins.Contracts.MetadataElement> Metadata  { get; }

        Stream GetPhotoStream();

        Stream GetThumbnailStream();

        /// <summary>
        /// A short description of the photo. Example: Marian climbs on the "elephant"
        /// </summary>
        string Title { get; set; }

        /// <summary>
        /// A set of keywords to describe the photo. See the content schema below for the list of keywords. Example: portrait, landscape
        /// </summary>
        string Subject { get; set; }

        /// <summary>
        /// A longer description of the photo. Example: Marian attempts to climb on the granite rock that is nicknamed "the elephant"
        /// </summary>
        string Description { get; set; }

        /// <summary>
        /// The photographer, as a URL that can be further described with other schemas. Example: http://www.example.org/People/Bos
        /// ("author/creator")
        /// </summary>
        string Creator { get; set; }

        /// <summary>
        /// The person or institution making the photo available, often the same as the creator.
        /// Example: http://www.example.org/People/Bos
        /// </summary>
        string Publisher { get; set; }

        /// <summary>
        /// A person who contributed in some way, e.g., the person who digitized the photo; may be a URL or a name.
        /// </summary>
        string Contributor { get; set; }

        /// <summary>
        /// the date and time the photo was taken, conforming to ISO format [ISOdate]. The year is required, everything else can be omitted: yyyy[-mm[-dd[Thh:mm[:ss[.sTZD]]]]]. The default time zone is UTC. Example: 1999-10-01
        /// </summary>
        DateTime Date { get; set; }

        /// <summary>
        /// Always "image" (see the Dublin Core's List of Resource Types)
        /// </summary>
        string Type { get; set; }

        /// <summary>
        /// Always "image/jpeg"
        /// </summary>
        string Format { get; set; }

        /// <summary>
        /// A number for the photo that is meaningful to the publisher. This is not the URL of the photo and it does not have to be globally unique. Example: 312
        /// (User identifier for image
        /// </summary>
        string Identifier { get; set; }

        /// <summary>
        /// Identifies a series: the event or topic for a series of photographs. Can be a URL or a string. Example: Marian in Le Sidobre.
        /// </summary>
        string Relation { get; set; }

        /// <summary>
        /// The location shown on the photo. (Note that we only use the "spatial coverage," not the "temporal coverage," since we assume that a photo is instantaneous and thus the date field is enough.). Example: Le Sidobre (Tarn)
        /// </summary>
        string Coverage { get; set; } //("location")

        long Width
        {
            get;
        }

        long Height
        {
            get;
        }

    }
}
/*
 * http://www.w3.org/TR/photo-rdf/
******** 5.1. The Dublin Core Schema

title
    a short description of the photo. Example: Marian climbs on the "elephant"
subject
    a set of keywords to describe the photo. See the content schema below for the list of keywords. Example: portrait, landscape
description
    a longer description of the photo. Example: Marian attempts to climb on the granite rock that is nicknamed "the elephant"
creator ("author/creator")
    the photographer, as a URL that can be further described with other schemas. Example: http://www.example.org/People/Bos
publisher
    the person or institution making the photo available, often the same as the creator. Example: http://www.example.org/People/Bos
contributor
    a person who contributed in some way, e.g., the person who digitized the photo; may be a URL or a name.
date
    the date and time the photo was taken, conforming to ISO format [ISOdate]. The year is required, everything else can be omitted: yyyy[-mm[-dd[Thh:mm[:ss[.sTZD]]]]]. The default time zone is UTC. Example: 1999-10-01
type
    always "image" (see the Dublin Core's List of Resource Types)
format
    always "image/jpeg"
identifier ("number")
    a number for the photo that is meaningful to the publisher. This is not the URL of the photo and it does not have to be globally unique. Example: 312
source
    not used.
language
    not used.
relation
    identifies a series: the event or topic for a series of photographs. Can be a URL or a string. Example: Marian in Le Sidobre.
coverage ("location")
    the location shown on the photo. (Note that we only use the "spatial coverage," not the "temporal coverage," since we assume that a photo is instantaneous and thus the date field is enough.). Example: Le Sidobre (Tarn)
rights
    copyright statement, or the URL for one. Example: http://www.example.org/People/Lafon/Copyright?1998

******** 5.2. The Technical Schema

The technical schema is defined by this RDF schema (for the formal definition, see appendix B):

camera
    the brand and type of the camera, or a URL for the camera. If the latter, the URL identifies one actual camera, not all cameras of that type. Example: http://www.example.org/People/Lafon/FooCamera8000i
film
    the brand and type of film. In contrast to the camera property, this is not an individual roll of film, but identifies all films of the same type. (We assume films of the same type are sufficiently similar; except for fabrication errors, they are interchangeable.) The value may be a string or a URL that is further described elsewhere. As a convention, digital cameras should be considered as "digital" film. Example: Ilfoo HP5
lens
    a definition of the lens used, maybe a URI describing it, a URI pointing to the camera for compact cameras, or just plain text description. Example: FooLens AF:70-210
devel-date
    date on which the film was developed. The date must be in the same form as the date property. Example: 1998-08-04

******** 5.3. The content schema

The content schema contains the keywords we use in the "subject" property of the Dublin Core schema. That property should contain as many of the following keywords as are applicable. The keywords have the following meaning:

Portrait
    The photo contains a portrait of one person.
Group-portrait
    The photo contains a portrait of a group of people.
Landscape
    The photo contains a landscape or skyline.
Baby
    The photo contains a baby.
Architecture
    The photo contains interesting buildings.
Wedding
    The photo contains scenes from a wedding.
Macro
    The photo contains an extreme close-up and would, when viewed under normal circumstances, be larger than life-size.
Graphic
    The photo contains a pattern, texture or design, that is interesting for its abstract, graphic quality.
Panorama
    The photo contains a wide-angle view of a landscape or skyline.
Animal
    The photo contains an animal. 
 */